import { ConfigProvider, ThemeConfig, theme } from "antd";
import zhCN from "antd/locale/zh_CN";
import { useRoutes } from "react-router-dom";
import routes from "@/routers/router.tsx";

const config: ThemeConfig = {
  token: {
    borderRadius: 10,
  }
};

export default () => {
  const element = useRoutes(routes);
  return (
    <ConfigProvider locale={zhCN} theme={config}>
      {element}
    </ConfigProvider>
  );
};